from django.db import models

# Create your models here.
class ChatItems(models.Model):
    """
    ChatItems
    """
    id = models.BigAutoField(primary_key=True)
    chat_id = models.CharField(verbose_name="会话ID", max_length=128, blank=False, null=False)
    user_id = models.IntegerField(verbose_name="用户ID", null=False, blank=False, default=0)
    role_id = models.IntegerField(verbose_name="角色ID", null=False, blank=False, default=0)
    model_id = models.IntegerField(verbose_name="模型ID", null=False, blank=False, default=0)
    username = models.CharField(verbose_name="用户名", max_length=32, blank=False, null=False)
    model = models.CharField(verbose_name="模型值", max_length=56, blank=False, null=False)
    title = models.CharField(verbose_name="会话名称", max_length=56, blank=False, null=False)

    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)
    deleted_at = models.DateTimeField(verbose_name="删除时间", null=True, blank=True, default=None)

